import { Length } from 'class-validator'
import { AzureApp } from 'src/typings'

export class AddAzureAppReq {
  @Length(1, 64)
  code: string

  @Length(1, 64)
  name: string

  @Length(1, 64)
  clientId: string

  @Length(1, 64)
  clientSecret: string

  @Length(1, 2000)
  oauthScope: string
}

export class UpdateAzureAppReq extends AddAzureAppReq {
}

export interface QueryAzureApp extends AzureApp {
  authUrl: string
  authorizeStatus: string
  renewStatus: string
}